import request from '@/utils/request';

export async function queryDepartment(params) {
  return request('/api/department', {
    params
  });
}

export async function removeDepartment(params) {
  return request('/api/department', {
    method: 'DELETE',
    data: {
      ...params
    },
  });
}

export async function addDepartment(params) {
  return request('/api/department', {
    method: 'POST',
    data: {
      ...params
    },
  });
}

export async function updateDepartment(params) {
  console.log(params)
  return request('/api/department', {
    method: 'put',
    data: {
      ...params
    },
  });
}
